package com.ruoyi.grape.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.grape.mapper.GrapePlantMapper;
import com.ruoyi.grape.domain.GrapePlant;
import com.ruoyi.grape.service.IGrapePlantService;

/**
 * 种植信息Service业务层处理
 * 
 * @author ld
 * @date 2023-11-18
 */
@Service
public class GrapePlantServiceImpl implements IGrapePlantService 
{
    @Autowired
    private GrapePlantMapper grapePlantMapper;

    /**
     * 查询种植信息
     * 
     * @param plantId 种植信息主键
     * @return 种植信息
     */
    @Override
    public GrapePlant selectGrapePlantByPlantId(Long plantId)
    {
        return grapePlantMapper.selectGrapePlantByPlantId(plantId);
    }

    /**
     * 查询种植信息列表
     * 
     * @param grapePlant 种植信息
     * @return 种植信息
     */
    @Override
    public List<GrapePlant> selectGrapePlantList(GrapePlant grapePlant)
    {
        return grapePlantMapper.selectGrapePlantList(grapePlant);
    }

    /**
     * 新增种植信息
     * 
     * @param grapePlant 种植信息
     * @return 结果
     */
    @Override
    public int insertGrapePlant(GrapePlant grapePlant)
    {
        return grapePlantMapper.insertGrapePlant(grapePlant);
    }

    /**
     * 修改种植信息
     * 
     * @param grapePlant 种植信息
     * @return 结果
     */
    @Override
    public int updateGrapePlant(GrapePlant grapePlant)
    {
        return grapePlantMapper.updateGrapePlant(grapePlant);
    }

    /**
     * 批量删除种植信息
     * 
     * @param plantIds 需要删除的种植信息主键
     * @return 结果
     */
    @Override
    public int deleteGrapePlantByPlantIds(Long[] plantIds)
    {
        return grapePlantMapper.deleteGrapePlantByPlantIds(plantIds);
    }

    /**
     * 删除种植信息信息
     * 
     * @param plantId 种植信息主键
     * @return 结果
     */
    @Override
    public int deleteGrapePlantByPlantId(Long plantId)
    {
        return grapePlantMapper.deleteGrapePlantByPlantId(plantId);
    }
}
